#include "app_encoder.h"


Encoder left_encoder;
Encoder right_encoder;

void Encoder_App_Init(void)
{
	Encoder_Driver_Init(&left_encoder,&htim2,0);
	Encoder_Driver_Init(&right_encoder,&htim3,0);
}


void Encoder_App_Task(void)
{
	Encoder_Driver_Update(&left_encoder);
	Encoder_Driver_Update(&right_encoder);
}


void Encoder_Info_Task(void)
{
	usart_printf(&huart1,"{left_encoder_speed_cm_s}%.1f\n",left_encoder.speed_cm_s);
//	usart_printf(&huart1,"{right_encoder_speed_cm_s}%.1f\n",right_encoder.speed_cm_s);
}
